// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const $ = require('jquery');
const express = require('express');
const app = require('express')();
const http = require('http').Server(app);
const io = require('socket.io').listen(http);
const path = require('path');

let userList = [];

$('button').click(function () {
   //启动服务器 
    app.use(express.static('assets'));

    io.on('connection', function(socket){
        $('ul').append(`<li> ${ socket.id}:  用户连接成功</li>`);  
    });



    http.listen(9999, () => { 
        $('.msg').html('服务器已启动！');
     });
    
})


